package com.cskaoyan.order.constant;

public class OrderConstants {

    public static int ORDER_STATUS_INIT=0; //初始化状态
    public static int ORDER_STATUS_PAYED=1; //已支付
    public static int ORDER_STATUS_TRANSACTION_SUCCESS=4; //交易成功
    public static int ORDER_STATUS_TRANSACTION_CLOSE=5; //交易关闭
    public static int ORDER_STATUS_TRANSACTION_FAILED=6; //交易失败
    public static int ORDER_STATUS_TRANSACTION_CANCEL=7; //订单取消

    // 用于发号器生成全局唯一的订单id
    public static String ORDER_ID = "order_id";
    // 用于发号器生成全局唯一的 UniqueKey
    public static String ORDER_UNIQUE_KEY = "order_unique_key";
    // 用于发号器生成全局唯一的订单商品条目id
    public static String ORDER_ITEM_ID = "order_item_id";

    // order表：payment_type
    // 在线支付
    public static int PAYMENT_TYPE_ONLINE = 1;
    // 货到付款
    public static int PAYMENT_TYPE_SHIP = 2;

    // order_item表：status
    // 库存已锁定
    public static int ORDER_ITEM_STATUS_STOCK_LOCK = 1;
    // 库存已释放
    public static int ORDER_ITEM_STATUS_STOCK_FREE = 2;
    // 库存扣减成功
    public static int ORDER_ITEM_STATUS_STOCK_REDUCE = 3;

    // 查询用户所有订单的 sort
    public static String ORDER_LIST_SORT = "create_time desc";

}

